package com.avicit.zipkinkafkaesserver.dao;

import com.avicit.zipkinkafkaesserver.entity.ZipkinUpdateMsg;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Sort;
import org.springframework.data.elasticsearch.repository.ElasticsearchRepository;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;


@Repository
public interface ZipkinUpdateMsgDao extends JpaRepository<ZipkinUpdateMsg,Long> {
//    List<ZipkinUpdateMsg> findByJobType(String jobType, Sort.Order esEndTime);
//
//    Page<ZipkinUpdateMsg> findByJobType(String jobType, PageRequest pageRequest);

    ZipkinUpdateMsg findByQueryDateAndUpdateStatusAndJobType(String queryDate, boolean updateStatus,String jobType);
}
